import { request } from '@umijs/max';
import api from '@/services/api';

export async function licenseList(params) {
  return request(api.license_list, {
    method: 'GET',
    params,
  });
}

export async function licenseDetail(params) {
  return request(api.license_detail, {
    method: 'GET',
    params,
  });
}

export async function licenseCreate(data) {
  return request(api.license_create, {
    method: 'POST',
    data,
  });
}

export async function licenseUpdate(data) {
  return request(api.license_update, {
    method: 'PUT',
    data,
  });
}

export async function licenseDelete(params) {
  return request(api.license_delete, {
    method: 'DELETE',
    params,
  });
}
